#!/bin/sh
## This file is sourced by some DM and should not contain any desktop execution.

## Internet browsers that need X to run.
export BROWSER=nyxt

## ~/.local/share/applications/mimeapps.list should symlink to ~/.config/mimeapps.list.
cat<<EOF > ~/.config/mimeapps.list
[Added Associations]
image/jpeg=sxiv.desktop
video/H264=mpv.desktop
video/mpeg=mpv.desktop
text/html=$BROWSER.desktop
application/pdf=$BROWSER.desktop

[Default Applications]
image/jpeg=sxiv.desktop
image/png=sxiv.desktop
video/mpeg=mpv.desktop
text/html=$BROWSER.desktop
application/pdf=zathura.desktop
x-scheme-handler/http=$BROWSER.desktop
x-scheme-handler/https=$BROWSER.desktop
x-scheme-handler/mailto=emacs-mail.desktop
EOF

## redshift
redshift -l 48.51:2.20 -t 6500:3500 &

## Start user services.
## For now, we need to start it here after X has started since it has graphical services.
shepherd

## Hook. Should be sourced last.
[ -f ~/.xprofile_hook ] && . ~/.xprofile_hook
